package com.chb.observer;

import com.chb.abstractfactory.Sprite;

/**
 * @author chihb
 * @create-time 2024/10/24 22:26
 * @description
 */
public class User implements Observer{
    private String name;

    public User(String name) {
        this.name = name;
    }

    @Override
    public void update(String msg) {
        System.out.println(name+"收到消息："+msg);
    }
}
